package yxy.game.pm2.module.union.boss;

import yxy.game.pm2.bean.module.rank.PlayerRankModule;

public class RankUnionBoss extends PlayerRankModule {

	// bean===========================================================================
	private String unionCode;
	private int bossId;

	public RankUnionBoss(UnionBoss boss) {
		super(null);
		this.unionCode = boss.getUnionCode();
		this.bossId = boss.getDataId();
		super.initInfo();
	}

	public RankUnionBoss(UnionBoss boss, int bossId) {
		super(null);
		this.unionCode = boss.getUnionCode();
		this.bossId = bossId;
		super.initInfo();
	}

	public String getUnionCode() {
		return unionCode;
	}

	@Override
	public String rankName() {
		return PlayerRankModule.getAllRankNames().get(12);
	}

	@Override
	protected long valuePlastic(long value) {
		return value * 100;
	}

	@Override
	protected long valueRestore(long score) {
		return score / 100;
	}
	// redis==========================================================================

	@Override
	protected String rankKey() {
		return String.format("UNION:%s:MODULE:%s:%s", unionCode, rankName(), bossId);
	}

	static public void reset() {
	}

}
